package org.fluidindia.ria.library.controller
{
	import flash.display.DisplayObject;
	
	import org.fluidindia.ria.library.event.ViewChangeEvent;

	/**
	 * <p>
	 * This is a controller managing all primary navigations in the application.
	 * </p>
	 * 
	 * <p>
	 * Flex provides three navigation controller i.e. ViewStack, TabNavigator and Accordion. Implementations
	 * for this interface should build for one of these controller.
	 * 
	 * This controller will receive a ViewChangeEvent. This event will carry with in itself the details of the view 
	 * that has been requested. The view names are captured in a parent.child format.
	 * </p>
	 * 
	 * <p>
	 * For details please look at a specific implementation.
	 * </p>
	 * 
	 * <p>
	 * The controller will parse the values and activate the respective view. In addition, this controller will perform
	 * following actions:
	 * <ol>
	 *   <li>Change the Browser's title</li>
	 *   <li>Change the Browser's url - to enable history and page back and forward actions</li>
	 *   <li>Intimate the incoming view of its activation. This will assist the views in reloading themselved.
	 *       This is critical, because once the flex view is created, it is not created again. This results
	 *       in basic action not getting executed again. The view has to be intimated explicitly to refresh itself.
	 *   </li>
	 *   <li>Intimate the outgoing view of its deactivation. This will assist to do any cleanups and releasing any memory.</li>
	 *   <li>Will handle any browser URL requests and reload respective view.</li>
	 * </p>
	 * 
	 */	public interface INavigationController
	{
		function changeView(event:ViewChangeEvent):void;

		function updateBrowserTitle():void;

		function updateBrowserURL():void;

		function communicateViewActivation(targetObject:DisplayObject, event:ViewChangeEvent):void;

		function communicateViewDeActivation():void;

		function handleBookmarks():void;
	}
}